<template>
    <div>
        <div v-if="result!==null">
            <div class="order-flag">
                <text :style="styles.containerFirstArg">{{result.index}}</text>
            </div>
            <div class="interval-container" :style="{'border-color':'black','border-width': '2px',...styles.container}">
                <div  style="
 position: absolute;
        left: 10px;
        border-radius: 40px;
        border-style: solid;
        width: 90px;
        border-color: black;
        border-width: 1px;
        justify-content: center;
        align-items: center;
        top: 5px;
        bottom: 5px;">
                    <text :style="styles.containerFirstArg">{{result.first.name}}</text>
                </div>

                <div  style="
 position: absolute;
        left: 105px;
        border-radius: 40px;
        border-style: solid;
        width: 90px;
        border-color: black;
        border-width: 1px;
        justify-content: center;
        align-items: center;
        top: 5px;
        bottom: 5px;">
                    <text :style="styles.containerFirstArg">{{result.second.name}}</text>
                </div>

                <div  style="
 position: absolute;
        left: 200px;
        border-radius: 40px;
        border-style: solid;
        width: 90px;
        border-color: black;
        border-width: 1px;
        justify-content: center;
        align-items: center;
        top: 5px;
        bottom: 5px;">
                    <text :style="styles.containerFirstArg">{{result.third.name}}</text>
                </div>
                <text :style="styles.containerFirstArg" style="
                        position: absolute;
        left: 300px;
        justify-content: center;
        align-items: center;
        top: 15px;
        bottom: 5px;
">对应的和弦为{{result.result}}</text>

            </div>
        </div>
    </div>
</template>

<script>
    // 根据音和音程获取二音答案展示组件


    import {getFormatHeightPX} from "../../../util/common";

    export default {
        name: "music-result-get-triad-show",
        props:{
            result:{
                type:Object,
                default:null
            }
        },
        data(){
            return {
                styles:{
                    container:{
                        height:getFormatHeightPX(60)
                    },
                    containerFirstArg: {
                        'font-size': getFormatHeightPX(26)
                    }
                }
            }
        }
    }
</script>


<style scoped>
    .interval-container {
        margin-top: 10px;
        margin-bottom: 10px;
        width: 620px;
        margin-left: 65px;
        height: 60px;
        border-radius: 40px;
        border-style: solid;
        justify-content: center;
    }

    .order-flag {
        position: absolute;
        left: 5px;
        border-radius: 20px;
        border-style: solid;
        width: 50px;
        border-color: black;
        border-width: 1px;
        justify-content: center;
        align-items: center;
        top: 10px;
        bottom: 10px;
    }
</style>
